      module allocs
      interface dmalloc
         module procedure mallocf1
         module procedure mallocd1
         module procedure malloci1
         module procedure mallocl1
         module procedure mallocf2
         module procedure mallocd2
         module procedure malloci2
         module procedure mallocl2
         module procedure mallocf3
         module procedure mallocd3
         module procedure malloci3
         module procedure mallocl3
         module procedure mallocf4
         module procedure mallocd4
         module procedure malloci4
         module procedure mallocl4
         module procedure mallocf5
         module procedure mallocd5
         module procedure malloci5
         module procedure mallocl5
      end interface
      interface dmalloc0
         module procedure mallocf01
         module procedure mallocd01
         module procedure malloci01
         module procedure mallocf02
         module procedure mallocd02
         module procedure malloci02
         module procedure mallocf03
         module procedure mallocd03
         module procedure malloci03
         module procedure mallocf04
         module procedure mallocd04
         module procedure malloci04
         module procedure mallocf05
         module procedure mallocd05
         module procedure malloci05
      end interface
!
      contains

      subroutine mallocf1(a,n1)
      include 'ntbytes.FI'
      real(4),pointer :: a(:)
      allocate(a(n1))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocd1(a,n1)
      include 'ntbytes.FI'
      real(8),pointer :: a(:)
      allocate(a(n1))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine malloci1(a,n1)
      include 'ntbytes.FI'
      integer,pointer :: a(:)
      allocate(a(n1))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocl1(a,n1)
      include 'ntbytes.FI'
      logical,pointer :: a(:)
      allocate(a(n1))
      a=.FALSE.
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocf2(a,n1,n2)
      include 'ntbytes.FI'
      real(4),pointer :: a(:,:)
      allocate(a(n1,n2))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocd2(a,n1,n2)
      include 'ntbytes.FI'
      real(8),pointer :: a(:,:)
      allocate(a(n1,n2))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine malloci2(a,n1,n2)
      include 'ntbytes.FI'
      integer,pointer :: a(:,:)
      allocate(a(n1,n2))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocl2(a,n1,n2)
      include 'ntbytes.FI'
      logical,pointer :: a(:,:)
      allocate(a(n1,n2))
      a=.FALSE.
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocf3(a,n1,n2,n3)
      include 'ntbytes.FI'
      real(4),pointer :: a(:,:,:)
      allocate(a(n1,n2,n3))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocd3(a,n1,n2,n3)
      include 'ntbytes.FI'
      real(8),pointer :: a(:,:,:)
      allocate(a(n1,n2,n3))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine malloci3(a,n1,n2,n3)
      include 'ntbytes.FI'
      integer,pointer :: a(:,:,:)
      allocate(a(n1,n2,n3))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocl3(a,n1,n2,n3)
      include 'ntbytes.FI'
      logical,pointer :: a(:,:,:)
      allocate(a(n1,n2,n3))
      a=.FALSE.
      nbytesf=nbytesf+size(a)
      end subroutine
      
      subroutine mallocf4(a,n1,n2,n3,n4)
      include 'ntbytes.FI'
      real(4),pointer :: a(:,:,:,:)
      allocate(a(n1,n2,n3,n4))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocd4(a,n1,n2,n3,n4)
      include 'ntbytes.FI'
      real(8),pointer :: a(:,:,:,:)
      allocate(a(n1,n2,n3,n4))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine malloci4(a,n1,n2,n3,n4)
      include 'ntbytes.FI'
      integer,pointer :: a(:,:,:,:)
      allocate(a(n1,n2,n3,n4))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocl4(a,n1,n2,n3,n4)
      include 'ntbytes.FI'
      logical,pointer :: a(:,:,:,:)
      allocate(a(n1,n2,n3,n4))
      a=.FALSE.
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocf5(a,n1,n2,n3,n4,n5)
      include 'ntbytes.FI'
      real(4),pointer :: a(:,:,:,:,:)
      allocate(a(n1,n2,n3,n4,n5))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocd5(a,n1,n2,n3,n4,n5)
      include 'ntbytes.FI'
      real(8),pointer :: a(:,:,:,:,:)
      allocate(a(n1,n2,n3,n4,n5))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine malloci5(a,n1,n2,n3,n4,n5)
      include 'ntbytes.FI'
      integer,pointer :: a(:,:,:,:,:)
      allocate(a(n1,n2,n3,n4,n5))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocl5(a,n1,n2,n3,n4,n5)
      include 'ntbytes.FI'
      logical,pointer :: a(:,:,:,:,:)
      allocate(a(n1,n2,n3,n4,n5))
      a=.FALSE.
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocf01(a,nb1,ne1)
      include 'ntbytes.FI'
      real(4),pointer :: a(:)
      allocate(a(nb1:ne1))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocd01(a,nb1,ne1)
      include 'ntbytes.FI'
      real(8),pointer :: a(:)
      allocate(a(nb1:ne1))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine malloci01(a,nb1,ne1)
      include 'ntbytes.FI'
      integer,pointer :: a(:)
      allocate(a(nb1:ne1))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocf02(a,nb1,ne1,nb2,ne2)
      include 'ntbytes.FI'
      real(4),pointer :: a(:,:)
      allocate(a(nb1:ne1,nb2:ne2))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocd02(a,nb1,ne1,nb2,ne2)
      include 'ntbytes.FI'
      real(8),pointer :: a(:,:)
      allocate(a(nb1:ne1,nb2:ne2))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine malloci02(a,nb1,ne1,nb2,ne2)
      include 'ntbytes.FI'
      integer,pointer :: a(:,:)
      allocate(a(nb1:ne1,nb2:ne2))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocf03(a,nb1,ne1,nb2,ne2,nb3,ne3)
      include 'ntbytes.FI'
      real(4),pointer :: a(:,:,:)
      allocate(a(nb1:ne1,nb2:ne2,nb3:ne3))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocd03(a,nb1,ne1,nb2,ne2,nb3,ne3)
      include 'ntbytes.FI'
      real(8),pointer :: a(:,:,:)
      allocate(a(nb1:ne1,nb2:ne2,nb3:ne3))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine malloci03(a,nb1,ne1,nb2,ne2,nb3,ne3)
      include 'ntbytes.FI'
      integer,pointer :: a(:,:,:)
      allocate(a(nb1:ne1,nb2:ne2,nb3:ne3))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocf04(a,nb1,ne1,nb2,ne2,nb3,ne3,nb4,ne4)
      include 'ntbytes.FI'
      real(4),pointer :: a(:,:,:,:)
      allocate(a(nb1:ne1,nb2:ne2,nb3:ne3,nb4:ne4))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocd04(a,nb1,ne1,nb2,ne2,nb3,ne3,nb4,ne4)
      include 'ntbytes.FI'
      real(8),pointer :: a(:,:,:,:)
      allocate(a(nb1:ne1,nb2:ne2,nb3:ne3,nb4:ne4))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine malloci04(a,nb1,ne1,nb2,ne2,nb3,ne3,nb4,ne4)
      include 'ntbytes.FI'
      integer,pointer :: a(:,:,:,:)
      allocate(a(nb1:ne1,nb2:ne2,nb3:ne3,nb4:ne4))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine

      subroutine mallocf05(a,nb1,ne1,nb2,ne2,nb3,ne3,nb4,ne4,nb5,ne5)
      include 'ntbytes.FI'
      real(4),pointer :: a(:,:,:,:,:)
      allocate(a(nb1:ne1,nb2:ne2,nb3:ne3,nb4:ne4,nb5:ne5))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine mallocd05(a,nb1,ne1,nb2,ne2,nb3,ne3,nb4,ne4,nb5,ne5)
      include 'ntbytes.FI'
      real(8),pointer :: a(:,:,:,:,:)
      allocate(a(nb1:ne1,nb2:ne2,nb3:ne3,nb4:ne4,nb5:ne5))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine
!
      subroutine malloci05(a,nb1,ne1,nb2,ne2,nb3,ne3,nb4,ne4,nb5,ne5)
      include 'ntbytes.FI'
      integer,pointer :: a(:,:,:,:,:)
      allocate(a(nb1:ne1,nb2:ne2,nb3:ne3,nb4:ne4,nb5:ne5))
      a=0
      nbytesf=nbytesf+size(a)
      end subroutine      

end module
